<?xml version="1.0"?>
<atom:feed xmlns:atom="http://www.w3.org/2005/Atom" xmlns:html="http://www.w3.org/1999/xhtml">
  <atom:id>http://bill.welliver.org/atom/pike/Monger User</atom:id>
  <atom:title type="text">electronic.alchemy :: An Introduction to Monger</atom:title>
  <atom:updated>2026-07-21T12:32:40-04:00</atom:updated>
  <atom:link href="http://bill.welliver.org/atom/pike/Monger User" type="application/atom+xml"></atom:link>
  <atom:link href="http://bill.welliver.org/space/pike/Monger User" type="text/html"></atom:link>
  <atom:link href="http://bill.welliver.org/rss/pike/Monger User" type="application/rss+xml"></atom:link>
  <atom:generator uri="http://modules.gotpike.org/blahblah/Public.Syndication.ATOM" version="0.1">Public.Syndication.ATOM (Pike v8.0 release 1956)</atom:generator>
  <atom:icon>http://bill.welliver.org/favicon.ico</atom:icon>
  <atom:logo>http://bill.welliver.org/static/images/alchemy.gif</atom:logo>
  <atom:subtitle type="xhtml"><html:div xmlns:html="http://www.w3.org/1999/xhtml">One of the exciting new features available in Pike 7.6 is the addition of Monger. Monger is a tool designed to ease module management for Pike installations. By accessing data stored in a Pike Module Repository, Monger provides access to official and third party modules in real time. The current version of Monger provides 3 modes: List, Query and Install. We'll discuss each mode in turn below.<html:p class="paragraph"/>
<html:h3 class="heading-1.1">General Information
</html:h3>
Monger is available as part of all Pike 7.6 installations. Currently, Monger is a command line utility, and can be accessed using the following command:<html:p class="paragraph"/>
<html:div class="code"><html:pre><html:pre>
     pike -x monger
</html:pre></html:pre></html:div><html:p class="paragraph"/>

By default, monger will query the module repository at modules.gotpike.org:8000, however you can change the repository by providing it on the command line:<html:p class="paragraph"/>
<html:div class="code"><html:pre><html:pre>
     pike -x monger --repository=host:port
</html:pre></html:pre></html:div><html:p class="paragraph"/>

<html:b class="bold">List Mode</html:b><html:p class="paragraph"/>
List mode allows you to see a list of the modules in the repository, optionally limited by a substring.<html:p class="paragraph"/>
<html:div class="code"><html:pre><html:pre>
     pike -x monger --list [subphrase]
</html:pre></html:pre></html:div><html:p class="paragraph"/>

By running the list command without any additional arguments, you will get a list of all modules in the repository. If you wish to see modules in the repository whose name contains a given string, you can provide it after the list command. For example:<html:p class="paragraph"/>
<html:div class="code"><html:pre><html:pre>
     pike -x monger --list Public
</html:pre></html:pre></html:div><html:p class="paragraph"/>

This command will provide a list of all modules in the repository whose name contains the phrase "Public".<html:p class="paragraph"/>
<html:b class="bold">Query Mode</html:b><html:p class="paragraph"/>
Query mode allows you to view detailed information about a particular module in the repository. The query will include information about recommended versions of the module for your Pike installation.<html:p class="paragraph"/>
For example:<html:p class="paragraph"/>
<html:div class="code"><html:pre><html:pre>
     pike -x monger --query Public.Protocols.Jabber
     Selecting recommended version 1.0 <html:b><html:font color="darkblue">for</html:font></html:b> query.
     Public.Protocols.Jabber: This module provides a client <html:b><html:font color="darkgreen">int</html:font></html:b><html:b><html:font color="darkbrown">erface</html:font></html:b> to Jabber 
        Instant Messaging (IM) servers.
     Author/Owner: Bill Welliver
     Version: 1.0 (recommended)      License: GPL/LGPL/MPL
     Changes: Initial Release of the Jabber Client module<html:p class="paragraph"/>
     This version supports plaintext authentication, presence, roster 
     management and send/receive messaging in an asynchronous environment 
     using callbacks. Connection using SSL is supported though largely 
     untested.<html:p class="paragraph"/>
     This module is available <html:b><html:font color="darkblue">for</html:font></html:b> automated installation. 
</html:pre></html:pre></html:div><html:p class="paragraph"/>

Use the <html:tt class="monospace"><html:strike class="strike">version</html:strike></html:tt> option to view a particular version, and <html:tt class="monospace">force</html:tt> to force viewing of a particular version when it is not a recommended version (ie has a Pike dependency that is not satisfied by your version of Pike:<html:p class="paragraph"/>
<html:div class="code"><html:pre><html:pre>
     pike -x monger --query --version=1.1 System.PAM
     Requested version 1.1 is not the recommended version.
     use --force to force query of this version.
</html:pre></html:pre></html:div><html:p class="paragraph"/>

<html:b class="bold">Install Mode</html:b><html:p class="paragraph"/>
One of the most useful features of Monger is its Install mode. Install mode is similar in many ways to the install command available in Perl's CPAN module. This mode allows you to automate the potentially tedious job of installing a module from source.<html:p class="paragraph"/>
In order to use monger to install modules automatically, you must have the following in your PATH:<html:p class="paragraph"/>
<html:ul class="minus">
<html:li>gzip</html:li>
<html:li>tar</html:li>
<html:li>make</html:li>
<html:li>the c compiler you used to compile pike; usually gcc<html:p class="paragraph"/></html:li>
</html:ul>Monger will retrieve query the module repository for the best version of the module you want, download, build and finally install it. After a successful install, Monger will clean up after itself. If the build fails, Monger will leave the files it downloaded in case you wish to try to build the module manually.<html:p class="paragraph"/>
<html:div class="code"><html:pre><html:pre>
pike -x monger --install IP.v4
Selecting recommended version 0.2 <html:b><html:font color="darkblue">for</html:font></html:b> install.
beginning download of version 0.2...
wrote module to file IP_v4-0.2.tar.gz (15786 bytes)
uncompressing...IP_v4-0.2.tar.gz
working with tar file IP_v4-0.2.tar
IP_v4-0.2/
IP_v4-0.2/CVS/
IP_v4-0.2/CVS/Entries
IP_v4-0.2/CVS/Repository
IP_v4-0.2/CVS/Root
IP_v4-0.2/CVS/Template
IP_v4-0.2/module.pmod.in/
IP_v4-0.2/module.pmod.in/Address.pike
IP_v4-0.2/module.pmod.in/Prefix.pike
IP_v4-0.2/module.pmod.in/Protocol.pike
IP_v4-0.2/module.pmod.in/Tuple.pike
IP_v4-0.2/module.pmod.in/helpers.pike
IP_v4-0.2/module.pmod.in/module.pmod
IP_v4-0.2/configure.in
IP_v4-0.2/Makefile.in
IP_v4-0.2/configure
IP_v4-0.2/testsuite.in
 make PIKE_INCLUDES=-I/usr/local/pike/7.6.25/include/pike PIKE_SRC_DIR=/usr/local/pike/7.6.25/include/pike BUILD_BASE=/usr/local/pike/7.6.25/include/pike MODULE_BASE=/usr/local/pike/7.6.25/include/pike TMP_BINDIR=/usr/local/pike/7.6.25/include/pike SRCDIR=. FULL_SRCDIR=/home/bertrand/.monger/IP_v4-0.2/ TMP_MODULE_BASE=. PIKE_EXTERNAL_MODULE=pike_external_module CORE_AUTODOC_PATH=/usr/local/pike/7.6.25/doc/src/core_autodoc.xml SYSTEM_DOC_PATH=/usr/local/pike/7.6.25/doc/ SYSTEM_MODULE_PATH=/usr/local/pike/7.6.25/lib/modules LOCAL_MODULE_PATH=$$HOME/lib/pike/modules RUNPIKE=pike all
cd . &amp;&amp; /usr/local/pike/7.6.25/include/pike/run_autoconfig .
Running autoconf in .
AR=<html:i><html:font color="darkred">""</html:font></html:i> CFLAGS=<html:i><html:font color="darkred">"-g -Wa,--execstack -mcpu=i686"</html:font></html:i> LDFLAGS=<html:i><html:font color="darkred">"-L/usr/local/src/pike-7.6.25/src/bundles/lib -z execstack -R/usr/local/lib -L/usr/local/lib -R/usr/X11R6/lib -L/usr/X11R6/lib"</html:font></html:i> LDSHARED=<html:i><html:font color="darkred">"gcc -shared  "</html:font></html:i> CPPFLAGS=<html:i><html:font color="darkred">"-I/usr/local/src/pike-7.6.25/src/bundles/include -I/usr/local/include -I/usr/X11R6/include"</html:font></html:i> BUILDDIR=<html:i><html:font color="darkred">""</html:font></html:i> BINDIR=<html:i><html:font color="darkred">"/usr/local/pike/7.6.25/include/pike"</html:font></html:i> PIKE_SRC_DIR=<html:i><html:font color="darkred">"/usr/local/pike/7.6.25/include/pike"</html:font></html:i> BUILD_BASE=<html:i><html:font color="darkred">"/usr/local/pike/7.6.25/include/pike"</html:font></html:i> ./config.status --recheck
running /bin/sh ./configure  <html:strike class="strike">cache-file=./config.cache --with-cdebug --without-bundles CFLAGS=-g -Wa,</html:strike>execstack -mcpu=i686 CPPFLAGS=-I/usr/local/src/pike-7.6.25/src/bundles/include -I/usr/local/include -I/usr/X11R6/include LDFLAGS=-L/usr/local/src/pike-7.6.25/src/bundles/lib -z execstack -R/usr/local/lib -L/usr/local/lib -R/usr/X11R6/lib -L/usr/X11R6/lib  --no-create --no-recursion
configure: loading cache ./config.cache<html:p class="paragraph"/>
<html:font color="brown">###################################################
</html:font><html:font color="brown">## Configuring module: IP_v4-0.2
</html:font><html:font color="brown">## Installation dir:   
</html:font>
checking <html:b><html:font color="darkblue">for</html:font></html:b> C compiler <html:font color="black">default</html:font> output file name&#x2026; a.out
checking whether the C compiler works&#x2026; yes
checking whether we are cross compiling&#x2026; no
checking <html:font color="black"/><html:b><html:font color="darkblue">for</html:font></html:b> suffix of executables&#x2026; 
checking <html:b><html:font color="darkblue">for</html:font></html:b> suffix of <html:b><html:font color="darkgreen">object </html:font></html:b><html:b><html:font color="darkbrown">files...</html:font></html:b> (cached) o
checking whether we are using the GNU C compiler&#x2026; (cached) yes
checking whether /usr/local/pike/7.6.25/include/pike/smartlink gcc accepts -g&#x2026; (cached) yes
checking <html:b><html:font color="darkblue">for</html:font></html:b> /usr/local/pike/7.6.25/include/pike/smartlink gcc option to accept ANSI C&#x2026; (cached) none needed
checking <html:b><html:font color="darkblue">if</html:font></html:b> we are using TCC (TenDRA C Compiler)&#x2026; (cached) no
checking how to run the C preprocessor&#x2026; (cached) gcc -E
checking whether make sets $(MAKE)&#x2026; (cached) yes
checking <html:b><html:font color="darkblue">for</html:font></html:b> the Pike base directory&#x2026; /usr/local/pike/7.6.25/include/pike
configure: creating ./config.status
CONFIG_FILES=<html:i><html:font color="darkred">"make_variables:/usr/local/pike/7.6.25/include/pike/make_variables.in"</html:font></html:i> CONFIG_HEADERS=<html:i><html:font color="darkred">""</html:font></html:i> ./config.status
config.status: creating make_variables
CONFIG_FILES=Makefile CONFIG_HEADERS=<html:i><html:font color="darkred">""</html:font></html:i> ./config.status
config.status: creating Makefile
touch remake
Run make again
make: *** [Makefile] Error 1
 make PIKE_INCLUDES=-I/usr/local/pike/7.6.25/include/pike PIKE_SRC_DIR=/usr/local/pike/7.6.25/include/pike BUILD_BASE=/usr/local/pike/7.6.25/include/pike MODULE_BASE=/usr/local/pike/7.6.25/include/pike TMP_BINDIR=/usr/local/pike/7.6.25/include/pike SRCDIR=. FULL_SRCDIR=/home/bertrand/.monger/IP_v4-0.2/ TMP_MODULE_BASE=. PIKE_EXTERNAL_MODULE=pike_external_module CORE_AUTODOC_PATH=/usr/local/pike/7.6.25/doc/src/core_autodoc.xml SYSTEM_DOC_PATH=/usr/local/pike/7.6.25/doc/ SYSTEM_MODULE_PATH=/usr/local/pike/7.6.25/lib/modules LOCAL_MODULE_PATH=$$HOME/lib/pike/modules RUNPIKE=pike all
Making module.pmod
make all successful.
 make PIKE_INCLUDES=-I/usr/local/pike/7.6.25/include/pike PIKE_SRC_DIR=/usr/local/pike/7.6.25/include/pike BUILD_BASE=/usr/local/pike/7.6.25/include/pike MODULE_BASE=/usr/local/pike/7.6.25/include/pike TMP_BINDIR=/usr/local/pike/7.6.25/include/pike SRCDIR=. FULL_SRCDIR=/home/bertrand/.monger/IP_v4-0.2/ TMP_MODULE_BASE=. PIKE_EXTERNAL_MODULE=pike_external_module CORE_AUTODOC_PATH=/usr/local/pike/7.6.25/doc/src/core_autodoc.xml SYSTEM_DOC_PATH=/usr/local/pike/7.6.25/doc/ SYSTEM_MODULE_PATH=/usr/local/pike/7.6.25/lib/modules LOCAL_MODULE_PATH=$$HOME/lib/pike/modules RUNPIKE=pike verify
make[1]: Entering directory `/home/bertrand/.monger/IP_v4-0.2'
if test ! -d <html:i><html:font color="darkred">"./plib/modules"</html:font></html:i> ; then &amp;<html:font color="brown">#13;
</html:font>  mkdir -p ./plib/modules ; &amp;<html:font color="brown">#13;
</html:font>fi; <html:b><html:font color="darkblue">if</html:font></html:b> test <html:i><html:font color="darkred">"x"</html:font></html:i> != <html:i><html:font color="darkred">"x"</html:font></html:i> ; then &amp;<html:font color="brown">#13;
</html:font>  /usr/local/pike/7.6.25/include/pike/install_module module.so ./plib/modules/IP.pmod/_v4.so ;&amp;<html:font color="brown">#13;
</html:font>fi; &amp;<html:font color="brown">#13;
</html:font><html:b><html:font color="darkblue">if</html:font></html:b> test <html:i><html:font color="darkred">"xmodule.pmod.in"</html:font></html:i> != <html:i><html:font color="darkred">"x"</html:font></html:i>; then &amp;<html:font color="brown">#13;
</html:font>  /usr/local/pike/7.6.25/include/pike/install_module module.pmod ./plib/modules/IP.pmod/v4.pmod ;&amp;<html:font color="brown">#13;
</html:font>fi
make[1]: Leaving directory `/home/bertrand/.monger/IP_v4-0.2'
pike -Mplib/modules /usr/local/pike/7.6.25/include/pike/test_pike.pike testsuite
Doing tests in testsuite (0 tests)
Total tests: 0  (0 tests skipped)       
make verify successful.
 make PIKE_INCLUDES=-I/usr/local/pike/7.6.25/include/pike PIKE_SRC_DIR=/usr/local/pike/7.6.25/include/pike BUILD_BASE=/usr/local/pike/7.6.25/include/pike MODULE_BASE=/usr/local/pike/7.6.25/include/pike TMP_BINDIR=/usr/local/pike/7.6.25/include/pike SRCDIR=. FULL_SRCDIR=/home/bertrand/.monger/IP_v4-0.2/ TMP_MODULE_BASE=. PIKE_EXTERNAL_MODULE=pike_external_module CORE_AUTODOC_PATH=/usr/local/pike/7.6.25/doc/src/core_autodoc.xml SYSTEM_DOC_PATH=/usr/local/pike/7.6.25/doc/ SYSTEM_MODULE_PATH=/usr/local/pike/7.6.25/lib/modules LOCAL_MODULE_PATH=$$HOME/lib/pike/modules RUNPIKE=pike install
make install successful.
cleaning up IP_v4-0.2.tar
removing directory IP_v4-0.2
</html:pre></html:pre></html:div><html:p class="paragraph"/>

The module IP.v4 is now installed:<html:p class="paragraph"/>
<html:div class="code"><html:pre><html:pre>
pike
Pike v7.6 release 25 running Hilfe v3.5 (Incremental Pike Frontend)
&gt; indices(IP.v4);
(1) Result: ({ <html:font color="red">/* 8 elements */</html:font>
                <html:i><html:font color="darkred">"_ _author"</html:font></html:i>,
                <html:i><html:font color="darkred">"module"</html:font></html:i>,
                <html:i><html:font color="darkred">"helpers"</html:font></html:i>,
                <html:i><html:font color="darkred">"Tuple"</html:font></html:i>,
                <html:i><html:font color="darkred">"Prefix"</html:font></html:i>,
                <html:i><html:font color="darkred">"_ _version"</html:font></html:i>,
                <html:i><html:font color="darkred">"Protocol"</html:font></html:i>,
                <html:i><html:font color="darkred">"Address"</html:font></html:i>
            })
</html:pre></html:pre></html:div><html:p class="paragraph"/>

Note that monger (and the underlying build process) will use whatever compiler settings were used when the pike software was built. If you need to change them (for instance if you install a library in a new location), you will need to edit the specs file in the /path/to/pike/include/pike directory. Be careful when editing this file, as you can easily break the build process. Always make a backup copy of the specs file.<html:p class="paragraph"/>
<html:b class="bold">Developer Tools</html:b><html:p class="paragraph"/>
Recent versions of Monger provide tools for manipulating the module repository programmatically. This allows (for example) new module versions to be added to the repository from within a release creation script. Details for this functionality can be found in the Monger Developer documentation.<html:p class="paragraph"/>
<html:b class="bold">Drawbacks</html:b><html:p class="paragraph"/>
While Monger is a very useful tool, it does have a few shortcomings. Hopefully, these will be addressed in subsequent releases of Pike.<html:p class="paragraph"/>
<html:ul class="minus">
<html:li>Monger requires an active connection to the internet during operation.</html:li>
<html:li>Retrieved module distributions and data are not cached on the local client.</html:li>
<html:li>Data is not verified for authenticity using checksums.</html:li>
<html:li>Documentation is not automatically generated.</html:li>
<html:li>There is no interactive mode.</html:li>
<html:li>Settings are not currently saved.</html:li>
</html:ul></html:div></atom:subtitle>
</atom:feed>
